package com.jushu.storbox.filter;

import java.io.File;
import java.io.FileFilter;

public class SDCardFilter implements FileFilter {
		
	@Override
	public boolean accept(File file) {
		String pathName = file.getName();
		if(file == null || pathName == null) {
			return false;
		}
		
		pathName = pathName.trim();
		if(pathName.equals("")) {
			return false;
		}

		if(pathName.contains("sdcard") 
			|| pathName.contains("SdCard")
			|| pathName.contains("Sdcard")
			|| pathName.contains("external_sd")
			|| pathName.contains("ExternalSD")
			|| pathName.contains("ext_card")
			|| pathName.contains("external_SD")
			|| pathName.contains("udisk")
			|| pathName.contains("externalsd")
			|| pathName.contains("extrasd")
			|| pathName.contains("ext_sd")
			|| pathName.contains("extsd")
			|| pathName.contains("extrasd")
			|| pathName.contains("extrasd")) {
			return true;
		}
		return false;
	}
}
